// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 查询电话回访记录
 */
export function getVisitRecordsList(params) {
  return request({
    url: `/visit/getVisitRecordsList`,
    method: 'GET',
    params
  })
}


/**
 * 添加
 * @param
 */
export function insertVisit(pram) {
  const data = {
    visitPerson: pram.visitPerson,
    visitTel: pram.visitTel,
    visitTime: pram.visitTime,
    notes: pram.notes,
    complaintId: pram.complaintId,
    id: pram.id
  }
  return request({
    url: '/visit/insertAndUpdateVisit',
    method: 'post',
    data: data
  })
}


/**
 * 修改
 * @param
 */
// export function insertVisit(pram) {
//   const data = {
//     visitPerson: pram.visitPerson,
//     visitTel: pram.visitTel,
//     visitTime: pram.visitTime,
//     notes: pram.notes
//   }
//   return request({
//     url: '/visit/insertAndUpdateVisit',
//     method: 'post',
//     data: data
//   })
// }


/**
 * 删除电话回访记录
 */
export function deleteVisitRecords(pram){
  const data = {
    id: pram.id
  }
  return request({
    url:'/visit/deleteVisitRecords',
    method: 'GET',
    params: data
  })
}

